export default {
  namespaced:true, // 命名空间  加上这个属性  就不用担心方法名重复
  state:()=>{
    return {
      name:"珠峰",
      count:100
    }
  },
  mutations:{
    changeName(state,option){
      state.name = option
    },
    changeCount(state,option){
      console.log("A")
      state.count = 2000
    }
  },
  actions:{
    changeNameAsync(store,option){
      setTimeout(() => {
        store.commit('changeName',option)
      }, 1000);
    }
  }
}